home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-17 | 16.5 KB | 425 lines | [TEXT/MPS ] |
- ;
- ; File: Navigation.a
- ;
- ; Contains: Navigation Services Interfaces
- ;
- ; Version: Technology: 1.1
- ; Release: Universal Interfaces 3.2
- ;
- ; Copyright: © 1996-1998 by Apple Computer, Inc., all rights reserved
- ;
- ; Bugs?: For bug reports, consult the following page on
- ; the World Wide Web:
- ;
- ; http://developer.apple.com/bugreporter/
- ;
- ;
- IF &TYPE('__NAVIGATION__') = 'UNDEFINED' THEN
- __NAVIGATION__ SET 1
-
- IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
- include 'MacTypes.a'
- ENDIF
- IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
- include 'AppleEvents.a'
- ENDIF
- IF &TYPE('__TRANSLATION__') = 'UNDEFINED' THEN
- include 'Translation.a'
- ENDIF
- IF &TYPE('__MACWINDOWS__') = 'UNDEFINED' THEN
- include 'MacWindows.a'
- ENDIF
- IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
- include 'CodeFragments.a'
- ENDIF
-
-
-
- kNavMissingKindStringErr EQU -5699
- kNavInvalidCustomControlMessageErr EQU -5698
- kNavCustomControlMessageFailedErr EQU -5697
- kNavInvalidSystemConfigErr EQU -5696
-
-
- kNavDialogOptionsVersion EQU 0
- kNavReplyRecordVersion EQU 0
- kNavCBRecVersion EQU 0
- kNavFileOrFolderVersion EQU 0
- kNavMenuItemSpecVersion EQU 0
- ; typedef UInt16 NavDataVersion
-
-
- ; input action codes for NavAskSaveChanges()
- kNavSaveChangesClosingDocument EQU 1
- kNavSaveChangesQuittingApplication EQU 2
- kNavSaveChangesOther EQU 0
- ; typedef UInt32 NavAskSaveChangesAction
-
-
- ; result codes for NavAskSaveChanges()
- kNavAskSaveChangesSave EQU 1
- kNavAskSaveChangesCancel EQU 2
- kNavAskSaveChangesDontSave EQU 3
- ; typedef UInt32 NavAskSaveChangesResult
-
-
- ; result codes for NavAskDiscardChanges()
- kNavAskDiscardChanges EQU 1
- kNavAskDiscardChangesCancel EQU 2
- ; typedef UInt32 NavAskDiscardChangesResult
-
-
- ; which elements are being filtered for objects:
- kNavFilteringBrowserList EQU 0
- kNavFilteringFavorites EQU 1
- kNavFilteringRecents EQU 2
- kNavFilteringShortCutVolumes EQU 3
- kNavFilteringLocationPopup EQU 4 ; for v1.1 or greater
- ; typedef short NavFilterModes
-
- NavFileOrFolderInfo RECORD 0
- version ds.w 1 ; offset: $0 (0)
- isFolder ds.b 1 ; offset: $2 (2)
- visible ds.b 1 ; offset: $3 (3)
- creationDate ds.l 1 ; offset: $4 (4)
- modificationDate ds.l 1 ; offset: $8 (8)
- locked ds.b 1 ; offset: $C (12) ; file is locked
- resourceOpen ds.b 1 ; offset: $D (13) ; resource fork is opened
- dataOpen ds.b 1 ; offset: $E (14) ; data fork is opened
- reserved1 ds.b 1 ; offset: $F (15)
- dataSize ds.l 1 ; offset: $10 (16) ; size of the data fork
- resourceSize ds.l 1 ; offset: $14 (20) ; size of the resource fork
- finderInfo ds FInfo ; offset: $18 (24) ; more file info:
- finderXInfo ds FXInfo ; offset: $28 (40)
- ORG 12
- shareable ds.b 1 ; offset: $C (12)
- sharePoint ds.b 1 ; offset: $D (13)
- mounted ds.b 1 ; offset: $E (14)
- readable ds.b 1 ; offset: $F (15)
- writeable ds.b 1 ; offset: $10 (16)
- reserved2 ds.b 1 ; offset: $11 (17)
- numberOfFiles ds.l 1 ; offset: $12 (18)
- finderDInfo ds DInfo ; offset: $16 (22)
- finderDXInfo ds DXInfo ; offset: $26 (38)
- reserved3 ds.b 214 ; offset: $36 (54)
- sizeof EQU * ; size: $10C (268)
- ENDR
- NavEventDataInfo RECORD 0
- event ds.l 1 ; offset: $0 (0) ; for event processing
- ORG 0
- param ds.l 1 ; offset: $0 (0) ; points to event specific data
- sizeof EQU * ; size: $4 (4)
- ENDR
- NavEventData RECORD 0
- eventDataParms ds NavEventDataInfo ; offset: $0 (0) ; the event data
- itemHit ds.w 1 ; offset: $4 (4) ; the dialog item number, for v1.1 or greater
- sizeof EQU * ; size: $6 (6)
- ENDR
- ; typedef UInt32 NavContext
-
- NavCBRec RECORD 0
- version ds.w 1 ; offset: $0 (0)
- context ds.l 1 ; offset: $2 (2) ; used by customization code to call Navigation Services
- window ds.l 1 ; offset: $6 (6) ; the dialog
- customRect ds Rect ; offset: $A (10) ; local coordinate rectangle of customization area
- previewRect ds Rect ; offset: $12 (18) ; local coordinate rectangle of the preview area
- eventData ds NavEventData ; offset: $1A (26)
- reserved ds.b 222 ; offset: $20 (32)
- sizeof EQU * ; size: $FE (254)
- ENDR
- ; typedef struct NavCBRec * NavCBRecPtr
-
-
- kNavCBEvent EQU 0 ; an event has occurred (update, idle events, etc.)
- kNavCBCustomize EQU 1 ; protocol for negotiating customization space
- kNavCBStart EQU 2 ; the navigation dialog is starting up
- kNavCBTerminate EQU 3 ; the navigation dialog is closing down
- kNavCBAdjustRect EQU 4 ; the navigation dialog is being resized
- kNavCBNewLocation EQU 5 ; user has chosen a new location in the browser
- kNavCBShowDesktop EQU 6 ; user has navigated to the desktop
- kNavCBSelectEntry EQU 7 ; user has made a selection in the browser
- kNavCBPopupMenuSelect EQU 8 ; signifies that a popup menu selection was made
- kNavCBAccept EQU 9 ; user has accepted the navigation dialog
- kNavCBCancel EQU 10 ; user has cancelled the navigation dialog
- kNavCBAdjustPreview EQU 11 ; preview button was clicked or the preview was resized
- ; typedef SInt32 NavEventCallbackMessage
-
- ; typedef void * NavCallBackUserData
-
- ; for events and customization:
- ; for preview support:
- ; filtering callback information:
-
- kNavCtlShowDesktop EQU 0 ; show desktop, parms = nil
- kNavCtlSortBy EQU 1 ; sort key field, parms->NavSortKeyField
- kNavCtlSortOrder EQU 2 ; sort order, parms->NavSortOrder
- kNavCtlScrollHome EQU 3 ; scroll list home, parms = nil
- kNavCtlScrollEnd EQU 4 ; scroll list end, parms = nil
- kNavCtlPageUp EQU 5 ; page list up, parms = nil
- kNavCtlPageDown EQU 6 ; page list down, parms = nil
- kNavCtlGetLocation EQU 7 ; get current location, parms<-AEDesc
- kNavCtlSetLocation EQU 8 ; set current location, parms->AEDesc
- kNavCtlGetSelection EQU 9 ; get current selection, parms<-AEDescList
- kNavCtlSetSelection EQU 10 ; set current selection, parms->AEDescList
- kNavCtlShowSelection EQU 11 ; make selection visible, parms = nil
- kNavCtlOpenSelection EQU 12 ; open view of selection, parms = nil
- kNavCtlEjectVolume EQU 13 ; eject volume, parms->vRefNum
- kNavCtlNewFolder EQU 14 ; create a new folder, parms->StringPtr
- kNavCtlCancel EQU 15 ; cancel dialog, parms = nil
- kNavCtlAccept EQU 16 ; accept dialog default, parms = nil
- kNavCtlIsPreviewShowing EQU 17 ; query preview status, parms<-Boolean
- kNavCtlAddControl EQU 18 ; add one control to dialog, parms->ControlHandle
- kNavCtlAddControlList EQU 19 ; add control list to dialog, parms->Handle (DITL rsrc)
- kNavCtlGetFirstControlID EQU 20 ; get 1st control ID, parms<-UInt16
- kNavCtlSelectCustomType EQU 21 ; select a custom menu item parms->NavMenuItemSpec
- kNavCtlSelectAllType EQU 22 ; select an "All" menu item parms->SInt16
- kNavCtlGetEditFileName EQU 23 ; get save dlog's file name parms<-StringPtr
- kNavCtlSetEditFileName EQU 24 ; set save dlog's file name parms->StringPtr
- kNavCtlSelectEditFileName EQU 25 ; select save dlog file name parms->ControlEditTextSelectionRec, for v1.1 or greater
- ; typedef SInt32 NavCustomControlMessage
-
-
- kNavAllKnownFiles EQU 0
- kNavAllReadableFiles EQU 1
- kNavAllFiles EQU 2
- ; typedef UInt16 NavPopupMenuItem
-
-
- kNavSortNameField EQU 0
- kNavSortDateField EQU 1
- ; typedef UInt16 NavSortKeyField
-
-
- kNavSortAscending EQU 0
- kNavSortDescending EQU 1
- ; typedef UInt16 NavSortOrder
-
-
- kNavDefaultNavDlogOptions EQU $000000E4 ; use defaults for all the options
- kNavNoTypePopup EQU $00000001 ; don't show file type/extension popup on Open/Save
- kNavDontAutoTranslate EQU $00000002 ; don't automatically translate on Open
- kNavDontAddTranslateItems EQU $00000004 ; don't add translation choices on Open/Save
- kNavAllFilesInPopup EQU $00000010 ; "All Files" menu item in the type popup on Open
- kNavAllowStationery EQU $00000020 ; allow saving of stationery files
- kNavAllowPreviews EQU $00000040 ; allow to show previews
- kNavAllowMultipleFiles EQU $00000080 ; allow multiple items to be selected
- kNavAllowInvisibleFiles EQU $00000100 ; allow invisible items to be shown
- kNavDontResolveAliases EQU $00000200 ; don't resolve aliases
- kNavSelectDefaultLocation EQU $00000400 ; make the default location the browser selection
- kNavSelectAllReadableItem EQU $00000800 ; make the dialog select "All Readable Documents" on Open
- ; typedef UInt32 NavDialogOptionFlags
-
-
- kNavTranslateInPlace EQU 0 ; translate in place, replacing translation source file (default for Save)
- kNavTranslateCopy EQU 1 ; translate to a copy of the source file (default for Open)
- ; typedef UInt32 NavTranslationOptions
-
- NavMenuItemSpec RECORD 0
- version ds.w 1 ; offset: $0 (0)
- menuCreator ds.l 1 ; offset: $2 (2)
- menuType ds.l 1 ; offset: $6 (6)
- menuItemName ds Str255 ; offset: $A (10)
- reserved ds.b 245 ; offset: $10A (266)
- ORG 512
- sizeof EQU * ; size: $200 (512)
- ENDR
- NavMenuItemSpecArray RECORD 0
- elements ds.b 1 * NavMenuItemSpec.sizeof
- sizeof EQU * ; size: $200 (512)
- ENDR
-
-
- ; typedef NavMenuItemSpecArray * NavMenuItemSpecArrayPtr
-
- ; typedef NavMenuItemSpecArrayPtr * NavMenuItemSpecArrayHandle
-
- ; typedef NavMenuItemSpecArrayPtr NavMenuItemSpecPtr
-
- ; typedef NavMenuItemSpecArrayHandle NavMenuItemSpecHandle
-
- NavTypeList RECORD 0
- componentSignature ds.l 1 ; offset: $0 (0)
- reserved ds.w 1 ; offset: $4 (4)
- osTypeCount ds.w 1 ; offset: $6 (6)
- osType ds.l 1 ; offset: $8 (8) <-- really an array of length one
- sizeof EQU * ; size: $C (12)
- ENDR
- ; typedef struct NavTypeList * NavTypeListPtr
-
- ; typedef NavTypeListPtr * NavTypeListHandle
-
- NavDialogOptions RECORD 0
- version ds.w 1 ; offset: $0 (0)
- dialogOptionFlags ds.l 1 ; offset: $2 (2) ; option flags for affecting the dialog's behavior
- location ds Point ; offset: $6 (6) ; top-left location of the dialog, or {-1,-1} for default position
- clientName ds Str255 ; offset: $A (10)
- windowTitle ds Str255 ; offset: $10A (266)
- actionButtonLabel ds Str255 ; offset: $20A (522) ; label of the default button (or null string for default)
- cancelButtonLabel ds Str255 ; offset: $30A (778) ; label of the cancel button (or null string for default)
- savedFileName ds Str255 ; offset: $40A (1034) ; default name for text box in NavPutFile (or null string for default)
- message ds Str255 ; offset: $50A (1290) ; custom message prompt (or null string for default)
- preferenceKey ds.l 1 ; offset: $60A (1546) ; a key for to managing preferences for using multiple utility dialogs
- popupExtension ds.l 1 ; offset: $60E (1550) ; extended popup menu items, an array of NavMenuItemSpecs
- reserved ds.b 494 ; offset: $612 (1554)
- sizeof EQU * ; size: $800 (2048)
- ENDR
- ; data returned by the utility dialogs:
- NavReplyRecord RECORD 0
- version ds.w 1 ; offset: $0 (0)
- validRecord ds.b 1 ; offset: $2 (2) ; open/save: true if the user confirmed a selection, false on cancel
- replacing ds.b 1 ; offset: $3 (3) ; save: true if the user is overwriting an existing object for save
- isStationery ds.b 1 ; offset: $4 (4) ; save: true if the user wants to save an object as stationery
- translationNeeded ds.b 1 ; offset: $5 (5) ; save: translation is 'needed', open: translation 'has taken place'
- selection ds AEDescList ; offset: $6 (6) ; open/save: list of AppleEvent descriptors of the chosen object(s)
- keyScript ds.w 1 ; offset: $E (14) ; open/save: script in which the name of each item in 'selection' is to be displayed
- fileTranslation ds.l 1 ; offset: $10 (16) ; open/save: list of file translation specs of the chosen object(s), if translation is needed
- reserved1 ds.l 1 ; offset: $14 (20)
- reserved ds.b 231 ; offset: $18 (24)
- ORG 256
- sizeof EQU * ; size: $100 (256)
- ENDR
- ;
- ; pascal OSErr NavLoad(void )
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavLoad
- ENDIF
-
- ;
- ; pascal OSErr NavUnload(void )
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavUnload
- ENDIF
-
- ;
- ; pascal UInt32 NavLibraryVersion(void )
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavLibraryVersion
- ENDIF
-
- ;
- ; pascal OSErr NavGetDefaultDialogOptions(NavDialogOptions *dialogOptions)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavGetDefaultDialogOptions
- ENDIF
-
-
- ;
- ; pascal OSErr NavGetFile(AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavPreviewUPP previewProc, NavObjectFilterUPP filterProc, NavTypeListHandle typeList, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavGetFile
- ENDIF
-
- ;
- ; pascal OSErr NavPutFile(AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, OSType fileType, OSType fileCreator, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavPutFile
- ENDIF
-
- ;
- ; pascal OSErr NavAskSaveChanges(NavDialogOptions *dialogOptions, NavAskSaveChangesAction action, NavAskSaveChangesResult *reply, NavEventUPP eventProc, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavAskSaveChanges
- ENDIF
-
- ;
- ; pascal OSErr NavCustomAskSaveChanges(NavDialogOptions *dialogOptions, NavAskSaveChangesResult *reply, NavEventUPP eventProc, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavCustomAskSaveChanges
- ENDIF
-
- ;
- ; pascal OSErr NavAskDiscardChanges(NavDialogOptions *dialogOptions, NavAskDiscardChangesResult *reply, NavEventUPP eventProc, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavAskDiscardChanges
- ENDIF
-
- ;
- ; pascal OSErr NavChooseFile(AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavPreviewUPP previewProc, NavObjectFilterUPP filterProc, NavTypeListHandle typeList, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavChooseFile
- ENDIF
-
- ;
- ; pascal OSErr NavChooseFolder(AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavObjectFilterUPP filterProc, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavChooseFolder
- ENDIF
-
- ;
- ; pascal OSErr NavChooseVolume(AEDesc *defaultSelection, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavObjectFilterUPP filterProc, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavChooseVolume
- ENDIF
-
- ;
- ; pascal OSErr NavChooseObject(AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavObjectFilterUPP filterProc, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavChooseObject
- ENDIF
-
- ;
- ; pascal OSErr NavNewFolder(AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, void *callBackUD)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavNewFolder
- ENDIF
-
- ;
- ; pascal OSErr NavTranslateFile(NavReplyRecord *reply, NavTranslationOptions howToTranslate)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavTranslateFile
- ENDIF
-
- ;
- ; pascal OSErr NavCompleteSave(NavReplyRecord *reply, NavTranslationOptions howToTranslate)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavCompleteSave
- ENDIF
-
- ;
- ; pascal OSErr NavCustomControl(NavContext context, NavCustomControlMessage selector, void *parms)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavCustomControl
- ENDIF
-
- ;
- ; pascal OSErr NavDisposeReply(NavReplyRecord *reply)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavDisposeReply
- ENDIF
-
- ;
- ; pascal Boolean NavServicesCanRun(void )
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavServicesCanRun
- ENDIF
-
-
- ;
- ; pascal Boolean NavServicesAvailable(void)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NavServicesAvailable
- ENDIF
-
- ENDIF ; __NAVIGATION__
-
-